-- GENERATED SPELL FOR [Akubar the Seer] --


function spell0_8298(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(20831,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8298', 3000, 1)
end

function spell1_8298(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(20824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8298', 3000, 1)
end

function spell2_8298(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8298', 10000, 1)
end

function Sorts_8298(pUnit, Event)
local choix_sorts_8298 = math.random(0, 2)
if choix_sorts_8298 == 0 then
pUnit:RegisterEvent('spell0_8298', 1, 1)
end
if choix_sorts_8298 == 1 then
pUnit:RegisterEvent('spell1_8298', 1, 1)
end
if choix_sorts_8298 == 2 then
pUnit:RegisterEvent('spell2_8298', 1, 1)
end
end

function mob8298_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8298', math.random(1500, 3000), 1)
end

function mob8298_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8298_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8298_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8298, 1, 'mob8298_Action')
RegisterUnitEvent(8298, 2, 'mob8298_Leave')
RegisterUnitEvent(8298, 3, 'mob8298_Kill')
RegisterUnitEvent(8298, 4, 'mob8298_Die')
